<%@ page language="java" import="it.polimi.swim.entity.SystemUser, it.polimi.swim.entity.Skill,java.util.ArrayList,java.util.List"
contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="myStyle.css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SWIMv2</title>
</head>
<body>
<div id='header' >
	<div style="float:left"><a href="homeUser.jsp">SWIMv2</a></div>
	<div style="float:right;"><a href="SignoutServlet">Sign out</a></div>
</div>
<div id="content">
<br>
<fieldset class="fieldsetIndex">
<legend>New Help Request</legend>
<br>
<form method='post' action='HelpRequestServlet'>
Title: <input type='text' name='title'><br>
Description:<br> <textarea name='description'>Insert a brief description of your help request.</textarea><br><br>
Select a Skill:<br>
	<% 
	if(session.getAttribute("mail")!=null){
		List<Skill> skillList=(List<Skill>) request.getAttribute("skillList");

	out.println("<select name='skill'>");
	for(Skill s:skillList ){
		out.println("<option value="+s.getId()+">"+s.getName()+"</option>");
			
	}
	out.println("</select>");
	%>
	
	<br><br>Select a set of Helpers:
	<select name='helperSet'>
	<option value='usersBySkill'>Entire Network</option>
	<option value='friendsBySkill'>My Friends</option>
	</select>
	<br><br><input type='submit' value='Select Helper' align="right">
	</form>
</fieldset>
<%
}
else{
	out.println("<a href='index.jsp'>Log in</a>");
}
%>
</body>
</html>